import { Injectable } from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {ResultJson} from '../core/entity/result-json';
import {BaseService} from '../core/service/base.service';
import {PageForm} from '../core/entity/page-form';

@Injectable()
export class UserService {
  private pageForm: PageForm;
  constructor(private baseService: BaseService) {
  }

  page(data: any): Observable<ResultJson> {
    const url = '/as/userApi/page';
    console.log(data);
    this.pageForm = PageForm.getPageForm(data);
     return this.baseService.get({url: url, params: this.pageForm});
  }
}
